import request from '@/utils/request'

/**
 * 查询用户列表
 *
 * @param {any} query
 * @returns 用户列表
 */
export const listUser = async (query: any) => {
    return await request({
        url: "/user/list",
        method: "get",
        params: query,
    });
};

/**
 * 查询用户列表
 *
 * @param {any} query
 * @returns 用户列表
 */
export const getUserListAll = async (query: any) => {
    return await request({
        url: "/user/getAll",
        method: "get",
        params: query,
    });
};

/**
 * 查询在线人数
 *
 * @param {any} query
 * @returns 在线人数
 */
export const getOnline = async (query: any) => {
    return await request({
        url: "/user/onlineNum",
        method: "get",
        params: query,
    });
};

/**
 * 查询用户详情
 *
 * @param {any} query
 * @returns 用户详情
 */
export const getUserDetail = async (query: any) => {
    return await request({
        url: "/user/detail",
        method: "get",
        params: query,
    });
};

/**
 * 用户编辑
 *
 * @param {any} query
 * @returns 用户编辑
 */
export const userEdit = async (query: any) => {
    return await request({
        url: "/user/edit",
        method: "post",
        params: query,
    });
};

/**
 * 查询用户详情
 *
 * @param {any} query
 * @returns 用户详情
 */
export const adjustMoney = async (query: any) => {
    return await request({
        url: "/user/changeMoney",
        method: "post",
        params: query,
    });
};
